import axios from "axios";

/**
 * 全量查询字典数据
 */
export function getAllDictData(params: any) {
    return axios.get("/sys/dict/data/list/all", {
        params: params
    });
}

/**
 * 分页查询字典数据
 */
export function getPageDictData(params: any) {
    return axios.get("/sys/dict/data/list/page", {
        params: params
    });
}

/**
 * 添加或更新字典数据
 * @param data
 */
export function saveOrUpdateDictData(data: any) {
    return axios.post("/sys/dict/data/saveOrUpdate/manual", data);
}

/**
 * 根据id删除字典数据
 * @param params
 */
export function deleteDictDataById(params: any) {
    return axios.delete("/sys/dict/data/delete/id", {
        params: params
    });
}
